#include <buola/image/io.h>

using namespace buola;

int main(int pNArg,char **pArgs)
{
    buola_init(pNArg,pArgs);

    try
    {
        img::CImage_gray32f lImage({640,480},img::pixel(0.379f));
   
        save(lImage,io::file("tonto.tif"));
    }
    catch(std::exception &pE)
    {
        msg_info() << "exception caught: " << pE.what() << "\n";
    }
    try
    {
        img::CImage_gray32f lImage2;

        load(lImage2,io::file("tonto.tif"));

        msg_info() << lImage2(50,37) << "\n";
    }
    catch(std::exception &pE)
    {
        msg_info() << "exception caught: " << pE.what() << "\n";
    }
}
